/*
 * Copyright 2007 - The JDPF Project Team (http://www.jdpf.org) 
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); 
 * you may not use this file except in compliance with the License. 
 * You may obtain a copy of the License at 
 * 
 * http://www.apache.org/licenses/LICENSE-2.0 
 * 
 * Unless required by applicable law or agreed to in writing, software 
 * distributed under the License is distributed on an "AS IS" BASIS, 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and 
 * limitations under the License. 
 */
package org.jdpf.core.plugins.blocks.transitions;

/**
 * The sets of wiring constraints. For how JDPF has been designed
 * all connections can be binary at most.
 * 
 * @author Paolo Ciccarese
 */
public class OccurrenceConstraints {

	public static final OccurrenceConstraints ONE_TO_ONE 
		= new OccurrenceConstraints(1, 1, 1, 1);
	public static final OccurrenceConstraints ONE_TO_TWO 
		= new OccurrenceConstraints(1, 1, 2, 2);
	public static final OccurrenceConstraints TWO_TO_ONE 
		= new OccurrenceConstraints(2, 2, 1, 1);
	
	private final int minInputArcs, maxInputArcs;	// Input arcs
	private final int minOutputArcs, maxOutputArcs;	// Output arcs

	public OccurrenceConstraints(
			final int minInputArcs, final int maxInputArcs, 
			final int minOutputArcs, final int maxOutputArcs) {

		this.minInputArcs = minInputArcs;
		this.maxInputArcs = maxInputArcs;
		this.minOutputArcs = minOutputArcs;
		this.maxOutputArcs = maxOutputArcs;
	}

	public int getMaxInputArcs() {
		return maxInputArcs;
	}

	public int getMaxOutputArcs() {
		return maxOutputArcs;
	}

	public int getMinInputArcs() {
		return minInputArcs;
	}

	public int getMinOutputArcs() {
		return minOutputArcs;
	}
}
